<!DOCTYPE html>
<html lang="zh-cn">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>维多购物平台</title>
    <link rel="shortcut icon" href="./images/favicon.ico" type="image/x-icon" />
    <link href="./bootstrap-3.4.1/css/bootstrap.min.css" rel="stylesheet">
    <link rel="stylesheet" href="./css/style.css">
    <script src="./js/jquery-3.4.1.min.js"></script>
    <script src="./bootstrap-3.4.1/js/bootstrap.min.js"></script>
    <script src="./js/index.js" type="module" defer="defer"></script>
    <script src="./js/cookie.js"></script>
    <style>
        .introduce {
            text-align: center;
            text-overflow: ellipsis;
            white-space: nowrap;
            overflow: hidden;
            max-width: 160px;
        }
    </style>
</head>

<body>
    <header id="header" class="no-user">
        <div class="logo">
            <img src="./images/logo.png" alt="logo">
        </div>
        <nav class="main-menu">
            <a href="/" class="active">首页</a>
            <a href="/allphone">手机</a>
            <a href="/allcomputer">电脑</a>
        </nav>
        <div class="user-info">
            <div class="user-operate">
                <div class="user-default">
                    <a href="/account#login">登录</a>
                    <span>|</span>
                    <a href="/account#register">注册</a>
                </div>
                <div class="user-one">
                    <div class="user-name">
                        <span id="username"></span>
                        <svg t="1687403727017" class="icon-user" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="872" width="15" height="15"><path d="M468.7872 738.5088c0-10.4448 4.096-20.8896 12.0832-28.8768L929.792 260.7104c15.9744-15.9744 41.984-15.9744 57.9584 0 7.9872 7.9872 12.0832 18.432 12.0832 28.8768s-4.096 20.8896-12.0832 28.8768L538.624 767.3856c-15.9744 15.9744-41.984 15.9744-57.9584 0-7.9872-7.9872-11.8784-18.432-11.8784-28.8768z" p-id="873"></path><path d="M30.3104 260.9152c7.9872-7.9872 18.432-12.0832 28.8768-12.0832s20.8896 4.096 28.8768 12.0832l448.9216 448.9216c15.9744 15.9744 15.9744 41.984 0 57.9584-7.9872 7.9872-18.432 12.0832-28.8768 12.0832s-20.8896-4.096-29.0816-12.0832L30.3104 318.6688c-15.9744-15.9744-15.9744-41.7792 0-57.7536z" p-id="874"></path></svg>
                    </div>
                    <div class="user-links">
                        <ul>
                            <li><a href="/user"  target="_blank">个人中心</a></li>
                            <li><a href="/wallet"  target="_blank">我的钱包</a></li>
                            <li><a href="/order"  target="_blank">我的订单</a></li>
                            <li><a href="/uevaluate"  target="_blank">评论晒单</a></li>
                            <li><a href="/" onclick="ClearCookie()">退出登录</a></li>
                        </ul>
                    </div>
                </div>
            </div>
            <a href="/trolley" class="mini-shopping-cart">购物车(<span id="count-trolley">0</span>)</a>
            </div>
    </header>
    <main class="index">
        <div id="myCarousel" class="carousel slide">
            <!-- 轮播（Carousel）指标 -->
            <ol class="carousel-indicators">
                <li data-target="#myCarousel" data-slide-to="0" class="active"></li>
                <li data-target="#myCarousel" data-slide-to="1"></li>
                <li data-target="#myCarousel" data-slide-to="2"></li>
            </ol> 
            <!-- 轮播（Carousel）项目 -->
            <div class="carousel-inner">
                <div class="item active">
                    <a href="/product?name=Xiaomi 13 Ultra"  target="_blank"><img decoding="async" src="./images/banner1.jpg" class="carousel-img" alt="First slide"></a>
                </div>
                <div class="item">
                    <a href="/product?name=Xiaomi Civi 3"  target="_blank"><img decoding="async" src="./images/banner2.jpg" class="carousel-img" alt="Second slide"></a>
                </div>
                <div class="item">
                    <a href="/product?name=Xiaomi 13 Ultra"  target="_blank"><img decoding="async" src="./images/banner3.jpg" class="carousel-img" alt="Third slide"></a>
                </div>
            </div>
            <!-- 轮播（Carousel）导航 -->
            <a class="left carousel-control" href="#myCarousel" role="button" data-slide="prev">
                <span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
                <span class="sr-only">Previous</span>
            </a>
            <a class="right carousel-control" href="#myCarousel" role="button" data-slide="next">
                <span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
                <span class="sr-only">Next</span>
            </a>
        </div>
        <div class="mini-show mini-phone-show">
            <div class="title">
                <span>手机</span>
                <a href="/allphone">
                    查看更多
                    <svg t="1687353674344" class="icon-more" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5801" width="30" height="30"><path d="M512 64C264.8 64 64 264.8 64 512s200.8 448 448 448 448-200.8 448-448S759.2 64 512 64zM398.4 784l-45.6-45.6L580 512 353.6 285.6l45.6-45.6 272 272-272.8 272z" p-id="5802"></path></svg>
                </a>
            </div>
            <div class="mini-phone-list mini-list">
                <div class="list-one-phone list-one">
                    <a href="/product?name=Xiaomi 13 Ultra" target="_blank"></a>
                </div>
                <ul id="mini-phone-list">
                    <li>
                        <a href="/product?name=Redmi K60 Pro" target="_blank">
                            <img src="./images/phone/Redmi K60 Pro.webp" alt="">
                            <div class="title">Redmi K60 Pro</div>
                            <div class="introduce">第二代骁龙8丨2K 高光屏丨VC 液冷散热丨索尼IMX800 大底相机+小米影像大脑2.0丨OIS光学防抖丨120W神仙秒充+30W无线秒充丨5000mAh大电量丨屏下指纹解锁</div>
                            <div class="price">2899元起</div>
                        </a>
                    </li>
                    <li>
                        <a href="/product?name=Redmi K60" target="_blank">
                            <img src="./images/phone/Redmi K60.webp" alt="">
                            <div class="title">Redmi K60</div>
                            <div class="introduce">狠快狠强,狠旗舰!2023,第一台梦幻手机</div>
                            <div class="price">2299元起</div>
                        </a>
                    </li>
                    <li>
                        <a href="/product?name=Redmi Note 12 Pro" target="_blank">
                            <img src="./images/phone/Redmi Note 12 Pro.webp" alt="">
                            <div class="title">Redmi Note 12 Pro</div>
                            <div class="introduce">IMX766 防抖相机｜OLED 柔性直屏｜67W 闪充</div>
                            <div class="price">1599元起</div>
                        </a>
                    </li>
                    <li>
                        <a href="/product?name=Redmi Note 12 Turbo" target="_blank">
                            <img src="./images/phone/Redmi Note 12 Turbo.webp" alt="">
                            <div class="title">Redmi Note 12 Turbo</div>
                            <div class="introduce">高通第二代骁龙 7+，性能芯超细四窄边护眼屏，轻薄长续航耐用高品质，四年使用流畅不卡顿</div>
                            <div class="price">2399元起</div>
                        </a>
                    </li>
                    <li>
                        <a href="/product?name=Redmi Note 12T Pro" target="_blank">
                            <img src="./images/phone/Redmi Note 12T Pro.webp" alt="">
                            <div class="title">Redmi Note 12T Pro</div>
                            <div class="introduce">天玑 8200-Ultra 旗舰芯｜ LCD 护眼屏｜ 12GB + 512GB 超大存储｜ 5080mAh 超大电量 + 67W 旗舰闪充｜ 6400万像素快拍相机｜ 潮流小立边设计｜ 小金刚品质 坚固耐用</div>
                            <div class="price">1599元起</div>
                        </a>
                    </li>
                    <li>
                        <a href="/product?name=Xiaomi 13 Ultra" target="_blank">
                            <img src="./images/phone/Xiaomi 13 Ultra.webp" alt="">
                            <div class="title">Xiaomi 13 Ultra</div>
                            <div class="introduce">徕卡光学全焦段四摄| 一英寸可变光圈| 徕卡专业街拍模式| 第二代骁龙8｜2K OLED 屏幕｜5000mAh大电量｜90W 小米澎湃有线秒充｜50W Pro 小米澎湃无线秒充</div>
                            <div class="price">5999元起</div>
                        </a>
                    </li>
                    <li>
                        <a href="/product?name=Xiaomi 13" target="_blank">
                            <img src="./images/phone/Xiaomi 13.webp" alt="">
                            <div class="title">Xiaomi 13</div>
                            <div class="introduce">第二代骁龙8｜徕卡专业光学镜头｜徕卡原生双画质｜徕卡75mm长焦 | 超窄边屏幕｜67W澎湃秒充</div>
                            <div class="price">4299元起</div>
                        </a>
                    </li>
                    <li>
                        <a href="/product?name=Xiaomi Civi 3" target="_blank">
                            <img src="./images/phone/Xiaomi Civi 3.webp" alt="">
                            <div class="title">Xiaomi Civi 3</div>
                            <div class="introduce">双生双色设计 | 前置仿生双主摄 | 原生质感人像 | 超轻薄好手感 | 天玑8200-Ultra高性能处理器 | 4500mAh大电池</div>
                            <div class="price">2999元起</div>
                        </a>
                    </li>
                </ul>
            </div>
        </div>
        <div class="mini-show mini-computer-show">
            <div class="title">
                <span>电脑</span>
                <a href="/allcomputer">
                    查看更多
                    <svg t="1687353674344" class="icon-more" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5801" width="30" height="30"><path d="M512 64C264.8 64 64 264.8 64 512s200.8 448 448 448 448-200.8 448-448S759.2 64 512 64zM398.4 784l-45.6-45.6L580 512 353.6 285.6l45.6-45.6 272 272-272.8 272z" p-id="5802"></path></svg>
                </a>
            </div>
            <div class="mini-computer-list mini-list">
                <div class="list-one-computer list-one">
                    <a href="/product?name=Redmi G" target="_blank"></a>
                </div>
                <ul id="mini-computer-list">
                    <li>
                        <a href="/product?name=HUAWEI MateBook 14" target="_blank">
                            <img src="./images/computer/HUAWEI MateBook 14.webp" alt="">
                            <div class="title">HUAWEI MateBook 14</div>
                            <div class="introduce">2K触控全面屏，13代酷睿处理器，超级终端</div>
                            <div class="price">5599元起</div>
                        </a>
                    </li>
                    <li>
                        <a href="/product?name=HUAWEI MateBook 16s" target="_blank">
                            <img src="./images/computer/HUAWEI MateBook 16s.webp" alt="">
                            <div class="title">HUAWEI MateBook 16s</div>
                            <div class="introduce">2.5K 高色准1触控屏 | 13 代英特尔®酷睿™ i9 处理器2 | 超级终端3</div>
                            <div class="price">6788元起</div>
                        </a>
                    </li>
                    <li>
                        <a href="/product?name=HUAWEI MateBook X Pro" target="_blank">
                            <img src="./images/computer/HUAWEI MateBook X Pro.webp" alt="">
                            <div class="title">HUAWEI MateBook X Pro</div>
                            <div class="introduce">护眼全面屏1|12 代英特尔® 酷睿™ 处理器|超级终端</div>
                            <div class="price">6288元起</div>
                        </a>
                    </li>
                    <li>
                        <a href="/product?name-MateBook D 15" target="_blank">
                            <img src="./images/computer/MateBook D 15.webp" alt="">
                            <div class="title">MateBook D 15</div>
                            <div class="introduce">护眼全面屏 12代英特尔® 酷睿™ 处理器超级终端</div>
                            <div class="price">6188</div>
                        </a>
                    </li>
                    <li>
                        <a href="/product?name=Redmi Book Pro 14 2022" target="_blank">
                            <img src="./images/computer/Redmi Book Pro 14 2022.webp" alt="">
                            <div class="title">Redmi Book Pro 14 2022</div>
                            <div class="introduce">锐龙6000H系列标压处理器 | 2.8K 90Hz OLED屏 | 14.9mm轻薄机身 | CNC一体精雕工艺 | 16G+512G</div>
                            <div class="price">5099</div>
                        </a>
                    </li>
                    <li>
                        <a href="/product?name=Redmi G" target="_blank">
                            <img src="./images/computer/Redmi G.webp" alt="">
                            <div class="title">Redmi G</div>
                            <div class="introduce">16英寸 2.5K 165Hz 电竞大屏 | 可选 GeForce RTX™ 3050 Ti</div>
                            <div class="price">3999元起</div>
                        </a>
                    </li>
                    <li>
                        <a href="/product?name=Redmi Book Pro 15 2022" target="_blank">
                            <img src="./images/computer/Redmi Book Pro 15 2022.webp" alt="">
                            <div class="title">Redmi Book Pro 15 2022</div>
                            <div class="introduce">全新12代英特尔处理器 | Windows 11 家庭中文版 | 可选RTX 2050高性能独立显卡 | 3.2K 90Hz 原色超清屏
                                全新12代英特尔处理器 | Windows 11 家庭中文版 | 可选RTX 2050高性能独立显卡 | 3.2K 90Hz 原色超清屏</div>
                            <div class="price">5799元起</div>
                        </a>
                    </li>
                    <li>
                        <a href="/product?name=Xiaomi computer Pro X 14" target="_blank">
                            <img src="./images/computer/Xiaomi computer Pro X 14.webp" alt="">
                            <div class="title">Xiaomi computer Pro X 14</div>
                            <div class="introduce">将一块高性能光追显卡装入轻薄本，超视网膜屏、高端工艺、智能体验，轻薄性能，小米笔记本Pro X 14，由此诞生。</div>
                            <div class="price">5999元起</div>
                        </a>
                    </li>
                </ul>
            </div>
        </div>
    </main>
    <div class="main-bottom bottom">
        <div class="footer-links clearfix">
            <dl class="col-links col-links-first">
                <dt></dt>
            </dl>
            <dl class="col-links ">
                <dt>选购指南</dt>
                <dd><a rel="nofollow" href="/allphone">手机</a></dd>
                <dd><a rel="nofollow" href="/allcomputer">电脑</a></dd>
            </dl>

            <dl class="col-links ">
                <dt>服务中心</dt>
                <dd><a rel="nofollow" onclick="openChat()" style="cursor: pointer">智能客服</a></dd>
                <dd><a rel="nofollow" href="/order" target="_blank">订单查询</a></dd>
            </dl>

            <dl class="col-links ">
                <dt>关于</dt>
                <dd><a rel="nofollow" href="https://sugarscat.com" target="_blank">了解我们</a></dd>
            </dl>
        </div>
        <div class="site-info">
            <div class="logo ir"></div>
            <div class="info-text">
                <p class="sites">
                    <a rel="nofollow" href="/" target="_blank">维多购物平台</a>
                    <span class="sep">|</span>
                    <a rel="nofollow" href="/privacy" target="_blank"
                    >隐私政策</a
                    >
                </p>
                <p class="sites">
                    <a rel="nofollow" href="http://www.cca.org.cn/" target="_blank"
                    >中国消费者协会</a
                    >
                    <span class="sep">|</span>
                    <a rel="nofollow" href="http://www.bj315.org/" target="_blank"
                    >北京市消费者协会</a
                    >
                </p>
                <p>
                    &copy;2023-至今 版权所有 维多购物平台
                    <br />
                    本网站所列数据、图片，均来自互联网已公开信息，仅供交流学习！
                </p>
            </div>
        </div>
    </div>
</body>
<script src="./js/message.js"></script>
<script src="./js/chat.js"></script>
<script>
    // 检查登录状况
    function checkLogin() {
        const header = document.getElementById("header")
        let id = GetCookie("id")
        let token = GetCookie("token")
        if (token.length>0) {
            $.ajax({
                url:"/api/index",
                method:"post",
                data:{
                    id: id,
                    token: token
                },
                success(res){
                    if(res.code===1001) {
                        AddMessage("info", "欢迎" + res.user + "用户")
                        SetCookie("user", res.user)
                        header.classList.remove("no-user")
                        header.classList.add("has-user")
                        document.getElementById("username").innerText = res.user
                    } else {
                        AddMessage("warning", "用户令牌过期")
                        header.classList.remove("has-user")
                        header.classList.add("no-user")
                    }
                }
            })
        }else{
            header.classList.remove("has-user")
            header.classList.add("no-user")
        }
    }
    checkLogin()
</script>
</html>